window.addEventListener('load', function () {
    var xlk = document.querySelector('.xlk');
    var lis = xlk.children;
    for (var i = 0; i < lis.length; i++) {
        lis[i].onmouseover = function () {
            this.children[1].style.display = 'block';
        }
        lis[i].onmouseout = function () {
            this.children[1].style.display = 'none';
        }
    }
    var hour = document.querySelector('.hour');
    var minute = document.querySelector('.minute');
    var second = document.querySelector('.second');
    // var inputtime = +new Date('2021-8-10 22:00:00');
    var inputtime = +new Date('2021-9-21 22:00:00')
    countdown();
    setInterval(countdown, 1000);
    function countdown() {
        var nowtime = +new Date();
        var times = inputtime - nowtime;
        var h = parseInt(times / 1000 / 60 / 60 % 24);
        h = h >= 10 ? h : '0' + h;
        hour.innerHTML = h;
        var m = parseInt(times / 1000 / 60 % 60);
        m = m >= 10 ? m : '0' + m;
        minute.innerHTML = m;
        var s = parseInt(times / 1000 % 60);
        s = s >= 10 ? s : '0' + s;
        second.innerHTML = s;
    }
})